export const saveStorageUser = (data) => {
  return localStorage.setItem('userInfo', JSON.stringify(data));
};

export const saveStorageToken = (data) => {
  return localStorage.setItem('token', JSON.stringify(data));
}

export const getStorageUser = (data) => {
  return localStorage.getItem('userInfo') ? JSON.parse(localStorage.getItem('userInfo')) : null;
};

export const delStorageUser = () => {
  return localStorage.removeItem('userInfo');
};

export const delStorageToken = () => {
  return localStorage.removeItem('token');
};